package net.hvacapp.cmvrfforandroid.ui.resource;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import net.hvacapp.cmvrfforandroid.R;
import net.hvacapp.cmvrfforandroid.ui.fragment.BaseFragment;
import net.hvacapp.cmvrfforandroid.utils.AnnotationUtil;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;


@EFragment(R.layout.fragment_experience)
public class ExperienceFragment  extends BaseFragment {


    @ViewById(R.id.rl_company)
    LinearLayout mCompanyRl;
    @ViewById(R.id.rl_demo)
    LinearLayout mDemoRl;
    @ViewById(R.id.rl_product)
    LinearLayout mProductRl;
    @ViewById(R.id.rl_video)
    LinearLayout mVideRl;

    public ExperienceFragment() {
        // Required empty public constructor
    }


    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
        if (!hidden) {

        }
    }

    @AfterViews
    public void init(){

        initData();

        initListener();
    }

    private void initListener() {
        mCompanyRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), AnnotationUtil.get(ExperienceListActivity.class));
                intent.putExtra("type", 1);
                startActivity(intent);
            }
        });

        mProductRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), AnnotationUtil.get(ExperienceListActivity.class));
                intent.putExtra("type", 0);
                startActivity(intent);
            }
        });

        mDemoRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), AnnotationUtil.get(ExperienceListActivity.class));
                intent.putExtra("type", 2);
                startActivity(intent);
            }
        });

        mVideRl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(getActivity(), AnnotationUtil.get(ExperienceListActivity.class));
                intent.putExtra("type", 3);
                startActivity(intent);
            }
        });
    }

    private void initData() {

    }


}
